<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('房型列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="btn-group-sm" id="toolbar" role="group">
        <a class="btn btn-success" onclick="$.operate.add()">
            <i class="fa fa-plus"></i> 新增
        </a>
        <a class="btn btn-primary single disabled" onclick="$.operate.edit()">
            <i class="fa fa-edit"></i> 修改
        </a>
        <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
            <i class="fa fa-remove"></i> 删除
        </a>
    </div>
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var prefix = ctx + "hotel/room/type";
    var datas = [[${@dict.getType('sys_normal_disable')}]];

    $(function() {
        var options = {
            uniqueId: 'id',
            url: prefix + "/list?hotelId=" + [[${hotelId}]],
            createUrl: prefix + "/add?hotelId=" + [[${hotelId}]],
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            // exportUrl: prefix + "/export",
            // importUrl: prefix + "/importData",
            // importTemplateUrl: prefix + "/importTemplate",
            //detailUrl: prefix + "/detail/{id}",
            //cleanUrl: prefix + "/clean",
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            search: true,
            modalName: "酒店房型",
            columns: [{
                checkbox: true
            },
                {
                    field : 'title',
                    title : '房间类型'
                },
                {
                    field : 'remark',
                    title : '类型备注'
                }
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>